home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 317 / asmsrc / input-fi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-20  |  2.1 KB  |  60 lines

  1. /* input_file.h header for input-file.c */
  2.  
  3. /* Copyright (C) 1987 Free Software Foundation, Inc.
  4.  
  5. This file is part of Gas, the GNU Assembler.
  6.  
  7. The GNU assembler is distributed in the hope that it will be
  8. useful, but WITHOUT ANY WARRANTY.  No author or distributor
  9. accepts responsibility to anyone for the consequences of using it
  10. or for whether it serves any particular purpose or works at all,
  11. unless he says so in writing.  Refer to the GNU Assembler General
  12. Public License for full details.
  13.  
  14. Everyone is granted permission to copy, modify and redistribute
  15. the GNU Assembler, but only under the conditions described in the
  16. GNU Assembler General Public License.  A copy of this license is
  17. supposed to have been given to you along with the GNU Assembler
  18. so you can know your rights and responsibilities.  It should be
  19. in a file named COPYING.  Among other things, the copyright
  20. notice and this notice must be preserved on all copies.  */
  21.  
  22. /*"input_file.c":Operating-system dependant functions to read source files.*/
  23.  
  24.  
  25. /*
  26.  * No matter what the operating system, this module must provide the
  27.  * following services to its callers.
  28.  *
  29.  * input_file_begin()            Call once before anything else.
  30.  *
  31.  * input_file_end()            Call once after everything else.
  32.  *
  33.  * input_file_buffer_size()        Call anytime. Returns largest possible
  34.  *                    delivery from
  35.  *                    input_file_give_next_buffer().
  36.  *
  37.  * input_file_open(name)        Call once for each input file.
  38.  *
  39.  * input_file_give_next_buffer(where)    Call once to get each new buffer.
  40.  *                    Return 0: no more chars left in file,
  41.  *                       the file has already been closed.
  42.  *                    Otherwise: return a pointer to just
  43.  *                       after the last character we read
  44.  *                       into the buffer.
  45.  *                    If we can only read 0 characters, then
  46.  *                    end-of-file is faked.
  47.  *
  48.  * All errors are reported (using as_perror) so caller doesn't have to think
  49.  * about I/O errors. No I/O errors are fatal: an end-of-file may be faked.
  50.  */
  51.  
  52. void    input_file_begin();
  53. void    input_file_end();
  54. int    input_file_buffer_size();
  55. int    input_file_is_open();
  56. void    input_file_open();
  57. char *    input_file_give_next_buffer();
  58.  
  59. /* end: input_file.h */
  60.